home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #067 (1990-04)(Amiga User Group Deutschland e.V.).zip / Franz PD Disk #067 (1990-04)(Amiga User Group Deutschland e.V.).adf / Include / TimerDevice.i < prev    next >
Text File  |  1989-07-02  |  1KB  |  55 lines

  1.  
  2. {
  3.     TimerDevice.i
  4.  
  5.     These are the Timer device definitions.
  6. }
  7.  
  8. {$I "Include/ExecIO.i"}
  9.  
  10. CONST
  11.     UnitMicroHz    = 0;
  12.     UnitVBlank    = 1;
  13.  
  14. CONST
  15.     TimerName    = "timer.device";
  16.  
  17. {
  18.     TimerBase is used by the routines that perform the actual
  19.    calls to AddTime, SubTime, and CmpTime declared below.  TimerBase
  20.    is set by a call to CreateTimer (declared in TimerUtils.i), but
  21.    you can also set it by opening the timer.device with OpenDevice,
  22.    then pulling the Device pointer from the TimerRequest record.  I
  23.    prefer the first way, frankly.
  24. }
  25.  
  26. VAR
  27.     TimerBase : Address;
  28.  
  29. TYPE
  30.     TimeVal = record
  31.     tvSecs,
  32.     tvMicro : Integer;
  33.     end;
  34.  
  35.     TimerRequest = record
  36.     trNode    : IORequest;
  37.     trTime    : TimeVal;
  38.     end;
  39.     TimerRequestPtr = ^TimerRequest;
  40.  
  41. const
  42.     TR_ADDREQUEST = CMD_NONSTD;
  43.     TR_GETSYSTIME = CMD_NONSTD + 1;
  44.     TR_SETSYSTIME = CMD_NONSTD + 2;
  45.  
  46. Procedure AddTime(VAR Dest, Source : TimeVal);
  47.     External;
  48.  
  49. Function CmpTime(VAR Dest, Source : TimeVal) : Integer;
  50.     External;
  51.  
  52. Procedure SubTime(VAR Dest, Source : TimeVal);
  53.     External;
  54.  
  55.